home *** CD-ROM | disk | FTP | other *** search
Visual Basic class definition | 1999-08-25 | 1.9 KB | 78 lines |
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "clsGlobal"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- Option Explicit
-
- 'Constants
- Const MyModule = "clsGlobal"
-
- 'Variables
- Private gStartTime As Date
- Private gCurrentTime As Date
-
- Friend Property Let CurrentTime(ByVal TheTime As Date)
- 'The time has been changed.
- 'Update the server and notify people.
-
- Const MyError = MyModule & "_" & "CurrentTime"
- If Timings Then PerformanceStartTime MyError
- On Error GoTo Err_Init
-
- 'Set the time
- gCurrentTime = TheTime
-
- 'Update the server
- CScreen.Time = TheTime
- CScreen.DebugText = "The time has been changed to " & gCurrentTime
-
- 'Notify people
-
-
- If Timings Then PerformanceEndTime MyError
- Exit Property
-
- Err_Init:
- CScreen.DebugText = MyError & ": " & Err.number & " - " & Err.Description
- Resume Next
- End Property
-
- Friend Property Get CurrentTime() As Date
- CurrentTime = gCurrentTime
- End Property
-
- Friend Property Let StartTime(ByVal TheTime As Date)
- 'Set the start time of the server.
-
- Const MyError = MyModule & "_" & "StartTime"
- If Timings Then PerformanceStartTime MyError
- On Error GoTo Err_Init
-
- 'Set the time
- gStartTime = TheTime
-
- 'Update the server
- CScreen.OutputText = "Incarnation server started at " & gStartTime
-
- If Timings Then PerformanceEndTime MyError
- Exit Property
-
- Err_Init:
- CScreen.DebugText = MyError & ": " & Err.number & " - " & Err.Description
- Resume Next
- End Property
-
- Friend Property Get StartTime() As Date
- StartTime = gStartTime
- End Property
-
-